package cn.com.yto56.cainiao.exponent.dto;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter
@Setter
@Accessors(chain = true)
public class QueryESResponse {
    private String index;
    private String type;
    private String id;
    private String data;

    public String getPath() {
        StringBuilder p = new StringBuilder();
        p.append("/").append(index);
        p.append("/").append(type);
        if (id != null && id.length() > 0) {
            p.append("/").append(id);
        }
        return p.toString();
    }
}
